<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: zhr
 * @LastEditTime: 2022-01-08 14:17:55
-->
<template>
  <!--1. 容器 -->
  <div ref="left1_container" id="container" style="height: 95%">{{}}</div>
</template>
<script>

import {Line} from '@antv/g2plot'
import {get} from '../../../utils/request'
export default {
  data(){
    return{
      dataArr:[
        { year: '8：00', value: 16 },
        { year: '9：00', value: 18 },
        { year: '10：00', value: 18.5},
        { year: '11：00', value: 20 },
        { year: '12：00', value: 21},
        { year: '13：00', value: 21 },
      ]
    }
  },
created(){                  

},
mounted(){
  this.initChart()
},
methods:{
    initData(){
      get('pageQueryTodayData?page=1&pageSize=5&device_id=1').then(res=>{
        console.log(3333,res);
        this.dataArr = res.data
      })
    },


  initChart(){
  const line = new Line(this.$refs.left1_container, {
  data:this.dataArr,
  xField: 'year',
  yField: 'value',
});

line.render();

    line.render();

  }
}


}
</script>
